<div ng-controller="RoomsCtrl" ng-init="orderlistAction()">
    <ul class="sui-breadcrumb">
        <li><a href="#/rooms/orderlist">{{'Order'| translate}}</a></li>
        <li class="active">
            {{"List"|translate}}
        </li>
        <span class="sui-form sui-form pull-right">
          <input type="text"  placeholder="{{'Orderid'|translate}}"  ng-model="room_order_id">
          <input placeholder="{{'start time'|translate}}"  datetimepicker  ng-model="start_created">
          <input placeholder="{{'end time'|translate}}"   datetimepicker min-date="{{start_created}}"  ng-model="end_created">
          <button class="sui-btn btn-primary" type="submit" ng-click="getorderList()">{{'search'|translate}}</button>
          </button>
        </span>
    </ul>
    <div class="sui-row-fluid">
        <room-order-tab ng-model="chosedStatus" click-tab="getorderList(1)"></room-order-tab>
        <table class="sui-table table-bordered">
            <thead>
                <tr>
                    <th>{{'#'|translate}}</th>
                    <th>{{'用户昵称'|translate}}</th>
                    <th>{{'订单商品'|translate}}</th>
                    <th>{{'Orderid'|translate}}</th>
                    <th>{{'total_fee'|translate}}</th>
                    <th>{{'支付金额'|translate}}</th>
                    <th>{{'入住人'|translate}}</th>
                    <th>{{'operation'|translate}}</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="(key, list) in order_list">
                    <td>
                        {{key+1}}
                    </td>
                    <td style="width: 60px;">
                        <wxinfo ng-model="list.member_id" stye="1"></wxinfo>
                    </td>
                    <td colspan="list.son_data.length">
                        <table class="sui-table table-bordered">
                            <tr>
                                <td>{{'主图'|translate}}</td>
                                <td>{{'title'|translate}}</td>
                                <td>{{'数量'|translate}}</td>
                            </tr>
                            <tr ng-repeat="item in list.son_data">
                                <td><img ng-src="{{item.img}}" width="60"></td>
                                <td><span style="display: block;width: 100px;word-wrap:break-word">{{item.name}}</span></td>
                                <td>{{item.quantity}}</td>
                            </tr>
                        </table>
                    </td>
                    <td style="width: 180px;">
                        {{list.created_at | ddtt}}
                        <br/> {{list.room_order_id}}
                        <div class="sui-msg msg-tips">
                            <div class="msg-con">
                                <order-status ng-model="list.status" stype="1"></order-status>
                            </div>
                            <s class="msg-icon"></s>
                        </div>
                    </td>
                    <td style="width: 70px;">{{list.total_fee}}</td>
                    <td style="width: 70px;">
                        {{list.payment}}
                        <span ng-show="list.coupon_fee">(包含优惠:{{list.coupon_fee}}元)</span>
                    </td>
                    <td>
                        {{list.check_in_person}}
                        <br/> {{list.mobile}}
                        <br/> {{list.reserve_start_time}} - {{list.reserve_end_time}}
                    </td>
                    <td style="width: 160px;">
                        <button ng-click="roomsOrderUpdate(list.room_order_id)" ng-show="list.status == 'S_ORDER_WAIT_CONFIRM' " class="sui-btn btn-success">订单确认</button>
                        <a href="#/rooms/orderinfo?room_order_id={{list.room_order_id}}" class="sui-btn btn-primary">{{'info'|translate}}</a>
                        <print-order orderid="list.room_order_id" type="hotel"></print-order>
                    </td>
                </tr>
            </tbody>
        </table>
        <!-- 分页start -->
        <pager page-no="{{pageNo}}" page-size="pageSize" total="order_count" get-data="getorderList(pageNo)"></pager>
    </div>
    <!-- 分页end -->
</div>